﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace ZSZ.Website.Models
{
    public class UserRegModel
    {
        [Required(ErrorMessage ="手机号码不能为空")]
        [Phone(ErrorMessage = "手机号码格式不正确")]
        [DisplayName("手机号码")]
        public string PhoneNum { get; set; }

        [Required(ErrorMessage = "短信验证码不能为空")]
        [StringLength(4, MinimumLength = 4,ErrorMessage = "短信验证码长度有误")]
        [DisplayName("短信验证码")]
        public string SmsCode { get; set; }

        [Required(ErrorMessage = "确认密码不能为空")]
        [DisplayName("密码")]
        public string Password { get; set; }

        [Required(ErrorMessage = "确认密码不能为空")]
        [Compare(nameof(Password),ErrorMessage ="密码输入不一致")]
        [DisplayName("确认密码")]
        public string Password2 { get; set; }
    }
}